home *** CD-ROM | disk | FTP | other *** search
- Path: news.magmacom.com!not-for-mail
- From: ezust@mag1.magmacom.com (Acme Instant Dehydrated Boulder Kit)
- Newsgroups: comp.lang.c++
- Subject: Re: copy ctor for abstract classes?
- Date: 30 Mar 1996 19:39:27 -0500
- Organization: Cloud-Zero, Canada
- Message-ID: <4jkk7v$oo5@mag1.magmacom.com>
- References: <4jk8kg$e9h@darkstar.ucsc.edu>
- NNTP-Posting-Host: mag1.magmacom.com
-
- In article <4jk8kg$e9h@darkstar.ucsc.edu>, Ray Swartz <ray@cse.ucsc.edu> wrote:
- >Should an abstract base class have a copy constructor?
- >
-
- Don't see why not... The copy constructor will be automatically generated
- for you if you don't write one, which will do a member-by-member copy. It
- gets called automatically when you make a copy of a derived object. If your
- base class does any kind of external resource management, it is appropriate
- to write a copy constructor, regardless of whether it is an abstract base
- class or not.
-
-
- --
- Alan Ezust "Just because I work for the federal
- Ottawa, Canada government doesn't mean I'm an expert
- ezust@magmacom.com on cockroaches" -Special Agent Fox Mulder
- http://www2.magmacom.com/~ezust
-